package com.fighthouse.utils
{
	
	import flash.display.Sprite;
	import flash.events.KeyboardEvent;
	import flash.events.MouseEvent;
	
	import mx.controls.CheckBox;
	import mx.controls.TileList;
	import mx.controls.listClasses.IListItemRenderer;
	
	public class CheckBoxTileList extends TileList
	{
		public function CheckBoxTileList()
		{
			super();
		}

		
		// fake all mouse interaction as if it had the ctrl key down
		override protected function selectItem(item:IListItemRenderer,
	                                  shiftKey:Boolean, ctrlKey:Boolean,
	                                  transition:Boolean = true):Boolean
		{
			return super.selectItem(item,shiftKey,ctrlKey, transition);
		}
				
		// whenever we draw the renderer, make sure we re-eval the checked state
	    override protected function drawItem(item:IListItemRenderer,
	                                selected:Boolean = false,
	                                highlighted:Boolean = false,
	                                caret:Boolean = false,
	                                transition:Boolean = false):void
	    {
			//CheckBox(item._check).invalidateProperties();
			super.drawItem(item, selected, highlighted, caret, transition);
		}
	}
}